#define _CRT_SECURE_NO_WARNINGS 1
#include "vector.h"
#include <list>
namespace zkf
{
	void test1()
	{
		vector<int> s1(5, 1);
		vector<int> s2(6,2);
		vector<int> s3 = s1;
		list<int> s4;
		s4.push_back(6);
		s4.push_back(6);
		s4.push_back(6);
		s4.push_back(6);
		s4.push_back(6);
		s4.push_back(6);
		vector<int> s5(s4.begin(),s4.end());
		for (auto e : s5)
		{
			cout << e;
		}
		cout << endl;
		for (auto e : s3)
		{
			cout << e;
		}
		cout << endl;
		for (auto e : s2)
		{
			cout << e;
		}
		cout << endl;
		for (auto e : s1)
		{
			cout << e;
		}
		cout << endl;
		cout << s1.size() << endl;
		cout << s1.capacity() << endl;
		s1.push_back(5);
		s1.push_back(7);
		s1.pop_back();
		for (auto e : s1)
		{
			cout << e;
		}
		cout << endl;
		 vector<int>::iterator it = s1.begin() + 3;
		s1.insert(it, 7);
		for (auto e : s1)
		{
			cout << e;
		}
		cout << endl;
		s1.erase(it);
		for (auto e : s1)
		{
			cout << e;
		}
		cout <<endl;
	}
	void test2()
	{
		vector<string> s1(5, "11111111111");
		 s1.resize(4);
		vector<string> s2(s1);
		vector<string>::iterator p = s2.insert(s2.begin() + 1, "2222222222");
		*p = "333333333333";
		vector<string>::iterator q=s2.erase(s2.begin()+1);
		*q = "444444444444";
		for (auto e : s1)
		{
			cout << e<<" ";
		}
		cout << endl;
		for (auto e : s2)
		{
			cout << e<<" ";
		}
		cout << endl;
	}
}

int main()
{
	/*zkf::test1();*/
	zkf::test2();
	return 0;
}